window.guiClass = new Class({
	initialize: function() {
		this.initGui();
		var sp = $('splashscreen');
		if (sp) {
			Bro.log('hiding splashscreen');
			sp.fade('out');
			setTimeout(function() {
				sp.dispose();
				window.gui.auth();
			}, 500);
		} else {
			this.initGui();
		}		
	},
	initGui: function() {
		window.tips = new Tips('.tipped', {
			className: 'tooltipc',
			showDelay: 1000
		});
		Bro.log('gui');
		Xendri.Rounded('.tooltipc', 'transparent', 'url("usr/img/head.png")', 'small');
		
		Xendri.Rounded.Bottom('#top-toolbar', 'transparent', 'url("usr/img/head.png")');
		Xendri.Rounded.Top('#popup-toolbar', 'transparent', '#eee');
		Xendri.Rounded.Top('#popup-body', 'transparent', '#ccc', 'large');
		Xendri.Rounded.Bottom('#popup-body', 'transparent', '#eee', 'large');
		
		$('screen').removeClass('hide');
	}, 
	auth: function() {
		Xendri.Session.login('', '');
		Bro.log('logged in, loading requested component');
		document.fireEvent('locationChange');		
	}
});
